<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <ul>
        <!-- v-for 循环遍历,遍历的过程中会生成当前元素-->
        <li v-for="name in arr">{{name}}</li>
    </ul>

    <table border="1">
        <caption>英雄表</caption>
        <tr>
            <th>名字</th>
            <th>类型</th>
            <th>价格</th>
        </tr>
        <tr v-for="hero in heroes">
            <td>{{hero.name}}</td>
            <td>{{hero.money}}</td>
            <td>{{hero.type}}</td>
        </tr>
    </table>

</div>
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
<script>
    let v = new Vue({
        el: "body>div",
        data: {
            arr: ["孙尚香", "诸葛亮", "关羽"],
            heroes: [{name: "孙尚香", type: "射手", money: 6888},
                {name: "诸葛亮", type: "法师", money: 13888},
                {name: "关羽", type: "战士", money: 16888}
            ]
        }
    })
</script>
</body>
</html>